We need to have “bank maps” to color in. Two sources:
Points of attention:
st_as_sf().# load general packages used below
library(dplyr) # tidyverse datamanipulation library
library(sf) # tidyverse spatial features library
library(janitor) # utility function clean_names()
library(mapview)
library(tmap)
library(here)
raillines_1851 <- st_read(
file.path(Sys.getenv('DATADIR_HIVA_LOCAL'), 'ukda_occuphist_1851/1851_england_wales_scotland_rail_lines/1851EngWalesScotRail_Lines.shp')) %>%
clean_names()
## Reading layer `1851EngWalesScotRail_Lines' from data source `/home/rstudio/var/data/datadir_hiva/ukda_occuphist_1851/1851_england_wales_scotland_rail_lines/1851EngWalesScotRail_Lines.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1431 features and 2 fields
## geometry type: LINESTRING
## dimension: XY
## bbox: xmin: 155368 ymin: 36976.83 xmax: 655241.1 ymax: 805911.3
## epsg (SRID): NA
## proj4string: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +datum=OSGB36 +units=m +no_defs
mapview(raillines_1851)
qtm(raillines_1851)

census1851_districts <- st_read(
file.path(Sys.getenv('DATADIR_HIVA_LOCAL'), 'ukda_occuphist_1851/1851_england_wales_census_registration_districts/1851EngWalesRegistrationDistrict.shp')) %>%
clean_names()
## Reading layer `1851EngWalesRegistrationDistrict' from data source `/home/rstudio/var/data/datadir_hiva/ukda_occuphist_1851/1851_england_wales_census_registration_districts/1851EngWalesRegistrationDistrict.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1194 features and 6 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: 87019.07 ymin: 7067.26 xmax: 655747.5 ymax: 657473.5
## epsg (SRID): NA
## proj4string: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +datum=OSGB36 +units=m +no_defs
mapview(census1851_districts)